<?php
declare (strict_types=1);

namespace app\api\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class Spec_value extends Model
{
    public $table = 'pyg_spec_value';
    protected $pk = 'id';

    public static function delSpecValue($id)
    {
        return self::where('spec_id', $id)->delete();
    }

    // 规格值与规格的关系
    public function spec(){
        return $this->belongsTo(Spec::class,'spec_id')->bind(['spec_name']);
    }
}
